Thread: undefined reference to `PacketProcessor::SetSeqStart(unsigned char)'|

  1. #16
    Registered User
    Join Date
    Jun 2021
    Posts
    31
    It does compile perfectly with a clean version of the packet processor which would be packet.cpp in my files and it does compile perfectly..

  2. #17
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    OK, so what does the compiled version of the code do that is different to what you want it to do?

    You look at the first behaviour difference, you study the code to identify potential causes in the code.

    That might begin with something unobtrusive (to the functionality), like adding a debug print.
    Code:
    unsigned char PacketProcessor::Sequence()
    {
        int val = this->seqval;
     
        if (++this->seqval >= 10)
        {
            this->seqval = 0;
        }
        cout << "DEBUG: PP::Sequence::seqval=" << seqval << endl;
        return this->seqstart + val;
    }
    Try to figure out what the code is supposed to do, and check whether your understanding matches the reality of what gets printed out.

    This is going to take up weeks of your life, and is going to be frustrating with many dead ends. Are you ready for that?

    > Are you going to be able to help me anymore?
    If "help" is where you do the work and study, and ask a question here when you're stuck = yes.
    If "help" is where you dump your found code and your shopping list of changes for someone to fix for you = set up a payment plan for $100 per hour of my time.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #18
    Registered User
    Join Date
    Jun 2021
    Posts
    31
    Thank you very much Salem for your reply.

    I accidently deleted this the first time I posted so let's try this again

    I would love to study and put tons of time into this but recently I've lost total desire to finish this project..

    After rebuilding the project everything compiles successfully but I failed to notice that once compiled the .exe runs for a few then crashes.. I'm not giving up completely I guess but now idk where to start to fix this.. which needs to be first I assume because without fixing the crash there is no need fixing what we was talking about previous to this post.


    Precompiled version from other people run successfully on my cpu without crashing.


    I'm thinking that the problem lies within my cpu and not the source code but that is just what I assume

  4. #19
    Registered User
    Join Date
    Jun 2021
    Posts
    31
    To your previous question :


    the compiled version is different from what I want to do because without what I want to do there is only a 15 percent chance success rate to login to a server

  5. #20
    Registered User
    Join Date
    Jun 2021
    Posts
    31
    Oh and thank you Salem for your help 🙂 you are awesome!

  6. #21
    Registered User
    Join Date
    Jun 2021
    Posts
    31
    Update :

    I've got the program to compile and run successfully without crashing


    Now I've having the problem ( windows cannot find .exe please make sure you typed the name correctly

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How covert unsigned char[4] to unsigned integer?
    By barracuda in forum C Programming
    Replies: 110
    Last Post: 02-23-2015, 04:00 AM
  2. Unsigned char array to unsigned char?
    By Kishintai in forum C Programming
    Replies: 16
    Last Post: 04-26-2013, 01:37 PM
  3. Replies: 4
    Last Post: 07-24-2012, 10:41 AM
  4. undefined reference to `RunSwmmDll(char*, char*, char*)'
    By amkabaasha in forum C++ Programming
    Replies: 1
    Last Post: 10-31-2011, 12:33 PM
  5. Replies: 2
    Last Post: 10-06-2009, 09:37 AM

Tags for this Thread